#include "CG.h"

const float tab[4][4] = {
	/* A */		{ -1.9, -2.0, -1.9, -1.8 },
	/* C */		{ -1.0, -1.1, -2.9, -0.8 },
	/* G */		{ -1.9, -2.0, -1.9, -1.6 },
	/* U */		{ -1.7, -1.5, -1.9, -1.2 }
	};			/*  A	  C		G	  U   */

CG::CG()
{

}

float CG::getEnergia(char a, char b)
{
	int x;
	int y;

	if (a == 'A') x = 0;
	else if (a == 'C') x = 1;
	else if (a == 'G') x = 2;
	else if (a == 'U') x = 3;
	else x = -1;

	if (b == 'A') y = 0;
	else if (b == 'C') y = 1;
	else if (b == 'G') y = 2;
	else if (b == 'U') y = 3;
	else y = -1;

	return tab[y][x];
}
